package org.aokey.springdemo2.day62;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/A")
public class CalcController {
    @RequestMapping("/calc")
    public String calc(Integer num1,Integer num2){
        if(num1==null||num2==null){
            return "输入有误，请重新输入";
        }
        Integer result=num1+num2;
        return "<h1>计算结果："+result+"</h1>";
    }
}
